using Bulb.Core.Services.DataStore;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;

namespace Bulb.Test.RepositoryTests
{
    [TestClass]
    public class AllTests
        : RepositoryTests
    {
        [TestMethod]
        public void TestThatWhenRepositoryIsEmptyAllReturnsNothing()
        {
            var mockBulbItemRepository = new Mock<IRepository<BulbItem>>().Object;

            var result = mockBulbItemRepository.All();

            Assert.IsNull(result);
        }

        [TestMethod]
        public void TestThatAllReturnsRepositoryBulbs()
        {
            var result = MockBulbItemRepository.All();

            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Count);
        }
    }
}